package com.flash.BusinessParameters.mapper;

import com.flash.BusinessParameters.entity.Security;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
public interface SecurityMapper {
    @Select("select * from security")
    public List<Security> selectSecurity();
    @Delete("delete from security where securityId = #{securityId}")
    public int deleteSecurity(String securityId);
    @Insert("insert into security values(#{securityId},#{securityName},#{releaseDate},#{delayDate},#{securityType},#{exchangeName},#{plateId})")
    public int insertSecurity(Security security);
    @Update("update security set securityName = #{securityName},releaseDate = #{releaseDate},delayDate = #{delayDate},securityType=#{securityType},exchangeName=#{exchangeName},plateId=#{plateId} where securityId = #{securityId}")
    public int updateSecurity(Security security);
    @Select("select count(*) from security")
    public int selectCountSecurity();
    @Select("select * from security where 1=1  ${strWhere} ")
    public List<Security> selectSec(Map SecMap);

}
